<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>10-原型对象中this指向</title>
</head>
<body>
    <script>
        function Star(name,age){
            this.name = name;
            this.age = age;
            console.log(this);
        }
        let eason = new Star('eason',22);
        // 原型对象的 this 指向当前对象
        Star.prototype.sing = function(){
            console.log("原型对象的sing");
            console.log(this);
        };
        eason.sing();
    </script>
</body>
</html>